//
//  JCLStatus.swift
//  WeiBo
//
//  Created by DDC on 2017/9/11.
//  Copyright © 2017年 DDC. All rights reserved.
//

import UIKit
import YYModel

class JCLStatus: NSObject {

    // id
    var id:Int64 = 0
    // text
    var text:String?
    // user模型
    var user:JCLUser?
    // 转发
    var reposts_count:Int = 0
    /// 评论
    var comments_count:Int = 0
    /// 点赞
    var attitudes_count:Int = 0
    /// 微博配图模型数组
    var pic_urls:[JCLStatusPicture]?
    /// 转发微博模型
    var retweeted_status:JCLStatus?
    /// 创建时间
    var created_at:String?{
        didSet{
            createDate = Date.jcl_stringToDate(string: created_at ?? "")
        }
    }
    
    var createDate:Date?
    /// 微博来源
    var source:String?  {
        didSet {
            source = "来自: " + (source?.jcl_herf()?.text ?? "")
        }
    }
    override var description: String
        {
        return yy_modelDescription()
    }
    
    class func modelContainerPropertyGenericClass() -> ([String:AnyClass]) {
        
        return ["pic_urls":JCLStatusPicture.self]
    }
}
